package com.one.common.utils;

/**
 * Author: zhulunjun
 * Email: zhulunjun@qq.com
 * CreateDate: 2018/11/26 16:18
 * Description：
 **/
public class ClickUtils {

    private static final int MIN_DELAY_TIME= 1200;  // 两次点击间隔不能少于1200ms
    private static long lastClickTime;

    public static boolean isFastClick() {
        boolean flag = true;
        long currentClickTime = System.currentTimeMillis();
        if ((currentClickTime - lastClickTime) >= MIN_DELAY_TIME) {
            flag = false;
        }
        lastClickTime = currentClickTime;
        return flag;
    }

}
